package com.ruoyi.testmanagement.mapper;

import com.ruoyi.testmanagement.domain.Cab;
import org.apache.ibatis.annotations.Delete;

import java.util.List;


/**
 * cab 数据层
 *
 * @author Bruce
 */
public interface CabMapper {

    /**
     * query cab by cabId
     * @param id cabId
     * @return cab entity
     */
    Cab selectCabById(Long id);

    /**
     * query cab by name
     * @param name cab name
     * @return cab entity
     */
    Cab selectCabByName(String name);

    /**
     * get cab list
     * @return  List<Cab>
     */
    List<Cab> selectCabList(Cab cab);

    /**
     * add a cab to list
     * @param cab cab entity
     * @return cabId
     */
    int insertCab(Cab cab);

    /**
     * update an existed cab
     * @param cab
     * @return cabId
     */
    int updateCab(Cab cab);

    /**
     * delete a cab according to given id
     * @param cabId
     * @return delete cab id
     */
    int deleteCabById(Long cabId);

    /**
     * batch delete cabs by given ids
     * @param Ids
     * @return deleted cab ids
     */
    int deleteCabByIds(Long[] Ids);

}
